#encoding=UTF-8
'''
Created on 2012-12-26

@author: Administrator
'''
from django.utils import importlib

def getPage(request):
    return {
        'page':request.GET.get("page"),
        'pageSize':request.GET.get("pageSize"),  
        }
def getLimit(obj):
    obj['page']=int(obj['page']) if obj['page'] else 1
    obj['pageSize']=int(obj['pageSize']) if obj['pageSize'] else 10
    return {
        'start':(obj['page']-1)*obj['pageSize'],
        'end'  :obj['page']*obj['pageSize'],  
        }
    
def convertToArray(obj):
    ret=[]
    for item in obj:
        ret.append(item)
    return ret